//
//  SectionInfo.m
//  Gabber
//
//  Created by 惠国 陆 on 11-9-20.
//  Copyright 2011年 恒生聚源. All rights reserved.
//

#import "SectionInfo.h"
#import "SectionHeaderView.h"

@implementation SectionInfo


@synthesize open = _open;
@synthesize sectionName = _sectionName;
@synthesize items = _items;
@synthesize headerView = _headerView;

- (id)init
{
    self = [super init];
    if (self) {
        _items = [[NSMutableArray alloc] init];

    }
    
    return self;
}

- (void)dealloc {
    
    TT_RELEASE_SAFELY(_sectionName);
    TT_RELEASE_SAFELY(_items);
    TT_RELEASE_SAFELY(_headerView);
	[super dealloc];
}

+ (SectionInfo*) sectionInfo
{
    SectionInfo* sectionInfo = [[[self alloc] init] autorelease];

    return sectionInfo;
}

+ (SectionInfo*) sectionInfoWithName:(NSString*) sectionName;
{
    SectionInfo* sectionInfo = [[[self alloc] init] autorelease];
    sectionInfo.sectionName = sectionName;
    return sectionInfo;
}
+ (SectionInfo*) sectionInfoWithName:(NSString*) sectionName open:(BOOL)open;
{
    SectionInfo* sectionInfo = [[[self alloc] init] autorelease];
    sectionInfo.sectionName = sectionName;
    sectionInfo.open = open;
    return sectionInfo;
}
@end
